//
//  btnView.m
//  1243
//
//  Created by ym on 16/7/6.
//  Copyright © 2016年 1243. All rights reserved.
//

#import "btnView.h"

@interface btnView ()
@property (nonatomic,strong)UIImageView *Image;
@property(nonatomic,strong)UILabel *label;
@end

@implementation btnView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    
    if (self) {
        [self creatLabel];
    }
    
    return self;
    
}

- (void)creatLabel{
    self.Image= [[UIImageView alloc] init];
    [self addSubview:self.Image];
    
    
    self.label = [[UILabel alloc]init];
    [self addSubview:self.label];
    self.label.textAlignment = NSTextAlignmentCenter;

   
    
    
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.Image.frame = CGRectMake(self.frame.size.width/2 - 35, self.frame.size.height/2 - 55, 70, 70);
//    self.Image.center = self.center;
    self.Image.layer.masksToBounds = YES;
    self.Image.layer.cornerRadius = 35;
     self.label.text = self.labelStr;
    self.label.frame = CGRectMake(0, self.frame.size.height - 40, WIDTH/2, 20);
    self.Image.image = self.btnImage;
}


@end
